package site.lanmushan.framework.datascope.autoconfiguration;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.context.annotation.Import;
import site.lanmushan.framework.datascope.interceptor.datascope.DeleteDataScopeInterceptor;
import site.lanmushan.framework.datascope.interceptor.datascope.SelectDataScopeInterceptor;
import site.lanmushan.framework.datascope.interceptor.datascope.UpdateDataScopeInterceptor;
import site.lanmushan.framework.datascope.properties.DataScopeProperties;

import javax.annotation.PostConstruct;

/**
 * @author dy
 */
@Import({DeleteDataScopeInterceptor.class,
        UpdateDataScopeInterceptor.class,
        SelectDataScopeInterceptor.class,
        DataScopeProperties.class})
@ConditionalOnProperty(prefix = "slash.data-control.data-scope", name = "enabled", havingValue = "true")
public class DataScopeAutoConfiguration {
    @Autowired
    DataScopeProperties dataScopeProperties;
    @PostConstruct
    public void init(){
        System.out.println(dataScopeProperties);
    }
}
